<!DOCTYPE html>
<%@page import="mobi.weq.model.User"%>
<%@page import="java.util.List"%>
<%@page import="mobi.weq.dao.UserDao"%>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Log in</title>

<!-- Bootstrap -->
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="jsp/login.css">

</head>
<body>
	<%
		//showing error message if login failed
		String message = (String) request.getAttribute("errorMessage");
		if (message != null) {
	%>
	<div class="alert alert-danger"><%=message%></div>
	<%
		}
	%>
	<!--sending request to /login  -->
	<form action="login" method="post">
		<h1 class="title" style="color: orange">
			<b>WeQ Mobi</b>
		</h1>
		<div class="input-group" style="width: 300px">
			<span class="input-group-addon glyphicon glyphicon-user"></span>
			<input type="text" class="form-control" placeholder="Enter user name" name="username">
		</div>
		<div class="input-group" style="width: 300px">
			<span class="input-group-addon glyphicon glyphicon-lock"></span>
			<input type="password" class="form-control" placeholder="Enter your password" name="password">
		</div>
		<br />
		<div class="input-group" style="width: 300px">
			<span>
				<button class="log-in-button btn btn-default" type="submit">
					<b>Log in</b>
				</button>
			</span>
		</div>
	</form>
	<a rel="nofollow" href="">Forgot your password?</a>
	<br />
	<br />
	<div class="sign-up">
		<span class="sign-up-text" style="color: #F4A460">
			<i>I don't have an account yet.</i>
			<a class="sign-up-button btn btn-default" type="submit" href="signup">Sign up</a>
		</span>
	</div>

</body>
</html>